const express = require("express");
const http = require("http");
const app = express(http);
var cors = require("cors");
app.use(cors());
app.use(express.json());
app.use(express.urlencoded());
// 之后每个响应头都会被设置
app.post("/post", (req, res) => {
  console.log(req.body);
  res.json({ code: 200, msg: "success" });
});

app.listen(3000, () => {
  console.log("node server is running");
});
